<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<!-- template designed by Marco Von Ballmoos -->
			<title>Docs For Class CPSApiBehavior</title>
			<link rel="stylesheet" href="../../media/stylesheet.css" />
			<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
		</head>
		<body>
			<div class="page-body">			
<h2 class="class-name">Class CPSApiBehavior</h2>

<a name="sec-description"></a>
<div class="info-box">
	<div class="info-box-title">Description</div>
	<div class="nav-bar">
					<span class="disabled">Description</span> |
							<a href="#sec-descendents">Descendents</a>
			|											<a href="#sec-vars">Vars</a>
						|											<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
						
											<a href="#sec-const-summary">Constants</a> (<a href="#sec-consts">details</a>)
						
			</div>
	<div class="info-box-body">
        		<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">CPSApiBehavior provides a behavior to classes for making API calls</p>
	<ul class="tags">
				<li><span class="field">author:</span> Jerry Ablan &lt;<a href="mailto:jablan@pogostick.com">jablan@pogostick.com</a>&gt;</li>
				<li><span class="field">version:</span> SVN $Id: CPSApiBehavior.php 233 2009-06-10 23:54:16Z jerryablan@gmail.com $</li>
				<li><span class="field">since:</span> 1.0.5</li>
			</ul>
		<p class="notes">
			Located in <a class="field" href="_pogostick---behaviors---CPSApiBehavior.php.html">/pogostick/behaviors/CPSApiBehavior.php</a> (line <span class="field">21</span>)
		</p>
		
				
		<pre>CBehavior
   |
   --<a href="../../psYiiExtensions/Behaviors/CPSComponentBehavior.html">CPSComponentBehavior</a>
      |
      --CPSApiBehavior</pre>
	
			</div>
</div>

	<a name="sec-descendents"></a>
	<div class="info-box">
		<div class="info-box-title">Direct descendents</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
			<span class="disabled">Descendents</span>
			|												<a href="#sec-vars">Vars</a>
								|															<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
															<a href="#sec-const-summary">Constants</a> (<a href="#sec-consts">details</a>)
							
					</div>
		<div class="info-box-body">
			<table cellpadding="2" cellspacing="0" class="class-table">
				<tr>
					<th class="class-table-header">Class</th>
					<th class="class-table-header">Description</th>
				</tr>
								<tr>
					<td style="padding-right: 2em"><a href="../../psYiiExtensions/Behaviors/CPSOAuthBehavior.html">CPSOAuthBehavior</a></td>
					<td>
											CPSOAuthBehavior provides OAuth support to any Pogostick component
										</td>
				</tr>
							</table>
		</div>
	</div>

	<a name="sec-const-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Class Constant Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
							<a href="#sec-descendents">Descendants</a> |
						<span class="disabled">Constants</span> (<a href="#sec-consts">details</a>)
												<a href="#sec-vars">Vars</a>
				 
				|
										| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
					</div>
		<div class="info-box-body">
			<div class="const-summary">
								<div class="const-title">
					<img src="../../media/images/Constant.png" alt=" " />
					<a href="#HTTP_GET" title="details" class="const-name">HTTP_GET</a> = 					<span class="var-type"> 'GET'</span>

				</div>
								<div class="const-title">
					<img src="../../media/images/Constant.png" alt=" " />
					<a href="#HTTP_POST" title="details" class="const-name">HTTP_POST</a> = 					<span class="var-type"> 'POST'</span>

				</div>
							</div>
		</div>
	</div>


	<a name="sec-method-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Method Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
							<a href="#sec-descendents">Descendents</a> |
															<a href="#sec-const-summary">Constants</a> (<a href="#sec-consts">details</a>)
							
															<a href="#sec-vars">Vars</a>
				 
				|
						<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
		</div>
		<div class="info-box-body">			
			<div class="method-summary">
																												
												<div class="method-definition">
											<span class="method-result">CPSApiBehavior</span>
										<a href="#__construct" title="details" class="method-name">__construct</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">bool</span>
										<a href="#addRequestMapping" title="details" class="method-name">addRequestMapping</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$sLabel</span>, [<span class="var-type">string</span>&nbsp;<span class="var-name">$sParamName</span> = <span class="var-default">null</span>], [<span class="var-type">bool</span>&nbsp;<span class="var-name">$bRequired</span> = <span class="var-default">false</span>], [<span class="var-type"></span>&nbsp;<span class="var-name">$arOptions</span> = <span class="var-default">null</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$sApiName</span> = <span class="var-default">null</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$sSubApiName</span> = <span class="var-default">null</span>])
									</div>
																<div class="method-definition">
											<span class="method-result">mixed</span>
										<a href="#makeHttpRequest" title="details" class="method-name">makeHttpRequest</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$sUrl</span>, [<span class="var-type">string</span>&nbsp;<span class="var-name">$sQueryString</span> = <span class="var-default">null</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$sMethod</span> = <span class="var-default">'GET'</span>], [<span class="var-type"></span>&nbsp;<span class="var-name">$sUserAgent</span> = <span class="var-default">null</span>], [<span class="var-type">integer</span>&nbsp;<span class="var-name">$iTimeOut</span> = <span class="var-default">60</span>], [<span class="var-type">array</span>&nbsp;<span class="var-name">$arHeaders</span> = <span class="var-default">null</span>], [<span class="var-type">function|array</span>&nbsp;<span class="var-name">$oHeaderCallback</span> = <span class="var-default">null</span>], [<span class="var-type"></span>&nbsp;<span class="var-name">$oReaderCallback</span> = <span class="var-default">null</span>], <span class="var-type">function|array</span>&nbsp;<span class="var-name">$oReadCallback</span>)
									</div>
								</div>
		</div>
	</div>		

	<a name="sec-vars"></a>
	<div class="info-box">
		<div class="info-box-title">Variables</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
							<a href="#sec-descendents">Descendents</a> |
										<a href="#sec-var-summary">Vars</a> (<span class="disabled">details</span>)
						
			
												<a href="#sec-const-summary">Constants</a> (<a href="#sec-consts">details</a>)
							
										| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
					</div>
		<div class="info-box-body">
										<h4>Inherited Variables</h4>
				<A NAME='inherited_vars'><!-- --></A>
									<p>Inherited from <span class="classname"><a href="../../psYiiExtensions/Behaviors/CPSComponentBehavior.html">CPSComponentBehavior</a></span></p>
					<blockquote>
													<span class="var-title">
								<span class="var-name"><a href="../../psYiiExtensions/Behaviors/CPSComponentBehavior.html#var$m_sInternalName">CPSComponentBehavior::$m_sInternalName</a></span><br>
							</span>
													<span class="var-title">
								<span class="var-name"><a href="../../psYiiExtensions/Behaviors/CPSComponentBehavior.html#var$m_sPrefixDelimiter">CPSComponentBehavior::$m_sPrefixDelimiter</a></span><br>
							</span>
											</blockquote> 
										
		</div>
	</div>
	
	<a name="sec-methods"></a>
	<div class="info-box">
		<div class="info-box-title">Methods</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
							<a href="#sec-descendents">Descendents</a> |
															<a href="#sec-vars">Vars</a>
																			<a href="#sec-const-summary">Constants</a> (<a href="#sec-consts">details</a>)
							
										<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
						
		</div>
		<div class="info-box-body">
			<A NAME='method_detail'></A>

<a name="method__construct" id="__construct"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">Constructor __construct</span> (line <span class="line-number">44</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">*</p>
<p class="description"><p>Constructor</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">CPSApiBehavior</span>
		<span class="method-name">
			__construct
		</span>
				()
			</div>
	
		
			<hr class="separator" />
		<div class="notes">Redefinition of:</div>
		<dl>
			<dt><a href="../../psYiiExtensions/Behaviors/CPSComponentBehavior.html#method__construct">CPSComponentBehavior::__construct()</a></dt>
						<dd>Constructor</dd>
					</dl>
			
			<hr class="separator" />
		<div class="notes">Redefined in descendants as:</div>
		<ul class="redefinitions">
					<li>
				<a href="../../psYiiExtensions/Behaviors/CPSOAuthBehavior.html#method__construct">CPSOAuthBehavior::__construct()</a>
								: *
							</li>
				</ul>
	</div>
<a name="methodaddRequestMapping" id="addRequestMapping"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">addRequestMapping</span> (line <span class="line-number">159</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Adds to the requestMap array</p>
	<ul class="tags">
				<li><span class="field">return:</span> True if operation succeeded</li>
				<li><span class="field">see:</span> makeMapItem</li>
				<li><span class="field">see:</span> makeMapArray</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">bool</span>
		<span class="method-name">
			addRequestMapping
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$sLabel</span>, [<span class="var-type">string</span>&nbsp;<span class="var-name">$sParamName</span> = <span class="var-default">null</span>], [<span class="var-type">bool</span>&nbsp;<span class="var-name">$bRequired</span> = <span class="var-default">false</span>], [<span class="var-type"></span>&nbsp;<span class="var-name">$arOptions</span> = <span class="var-default">null</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$sApiName</span> = <span class="var-default">null</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$sSubApiName</span> = <span class="var-default">null</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$sLabel</span><span class="var-description">: The &quot;friendly&quot; name for consumers</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$sParamName</span><span class="var-description">: The name of the API variable, if null, $sLabel</span>			</li>
					<li>
				<span class="var-type">bool</span>
				<span class="var-name">$bRequired</span>			</li>
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$arOptions</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$sApiName</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$sSubApiName</span>			</li>
				</ul>
		
			
	</div>
<a name="methodmakeHttpRequest" id="makeHttpRequest"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">makeHttpRequest</span> (line <span class="line-number">97</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Make an HTTP request</p>
	<ul class="tags">
				<li><span class="field">return:</span> The data returned from the HTTP request or null for no data</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">mixed</span>
		<span class="method-name">
			makeHttpRequest
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$sUrl</span>, [<span class="var-type">string</span>&nbsp;<span class="var-name">$sQueryString</span> = <span class="var-default">null</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$sMethod</span> = <span class="var-default">'GET'</span>], [<span class="var-type"></span>&nbsp;<span class="var-name">$sUserAgent</span> = <span class="var-default">null</span>], [<span class="var-type">integer</span>&nbsp;<span class="var-name">$iTimeOut</span> = <span class="var-default">60</span>], [<span class="var-type">array</span>&nbsp;<span class="var-name">$arHeaders</span> = <span class="var-default">null</span>], [<span class="var-type">function|array</span>&nbsp;<span class="var-name">$oHeaderCallback</span> = <span class="var-default">null</span>], [<span class="var-type"></span>&nbsp;<span class="var-name">$oReaderCallback</span> = <span class="var-default">null</span>], <span class="var-type">function|array</span>&nbsp;<span class="var-name">$oReadCallback</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$sUrl</span><span class="var-description">: The URL to call</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$sQueryString</span><span class="var-description">: The query string to attach</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$sMethod</span><span class="var-description">: The HTTP method to use. Can be 'GET' or 'SET'</span>			</li>
					<li>
				<span class="var-type">integer</span>
				<span class="var-name">$iTimeOut</span><span class="var-description">: The number of seconds to wait for a response. Defaults to 60 seconds</span>			</li>
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$arHeaders</span><span class="var-description">: Headers to add to the request</span>			</li>
					<li>
				<span class="var-type">function|array</span>
				<span class="var-name">$oHeaderCallback</span><span class="var-description">: The callback function to call after the header has been read. Accepts function reference or array( object, method )</span>			</li>
					<li>
				<span class="var-type">function|array</span>
				<span class="var-name">$oReadCallback</span><span class="var-description">: The callback function to call after the body has been read. Accepts function reference or array( object, method )</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$sUserAgent</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$oReaderCallback</span>			</li>
				</ul>
		
			
	</div>
							<h4>Inherited Methods</h4>
				<a name='inherited_methods'><!-- --></a>	
									<!-- =========== Summary =========== -->
					<p>Inherited From <span class="classname"><a href="../../psYiiExtensions/Behaviors/CPSComponentBehavior.html">CPSComponentBehavior</a></span></p>
					<blockquote>
													<span class="method-name"><a href="../../psYiiExtensions/Behaviors/CPSComponentBehavior.html#method__construct">CPSComponentBehavior::__construct()</a></span><br>
													<span class="method-name"><a href="../../psYiiExtensions/Behaviors/CPSComponentBehavior.html#methodaddOption">CPSComponentBehavior::addOption()</a></span><br>
													<span class="method-name"><a href="../../psYiiExtensions/Behaviors/CPSComponentBehavior.html#methodaddOptions">CPSComponentBehavior::addOptions()</a></span><br>
													<span class="method-name"><a href="../../psYiiExtensions/Behaviors/CPSComponentBehavior.html#methodcheckCallbacks">CPSComponentBehavior::checkCallbacks()</a></span><br>
													<span class="method-name"><a href="../../psYiiExtensions/Behaviors/CPSComponentBehavior.html#methodcheckOptions">CPSComponentBehavior::checkOptions()</a></span><br>
													<span class="method-name"><a href="../../psYiiExtensions/Behaviors/CPSComponentBehavior.html#methodgetInternalName">CPSComponentBehavior::getInternalName()</a></span><br>
													<span class="method-name"><a href="../../psYiiExtensions/Behaviors/CPSComponentBehavior.html#methodgetNamePrefix">CPSComponentBehavior::getNamePrefix()</a></span><br>
													<span class="method-name"><a href="../../psYiiExtensions/Behaviors/CPSComponentBehavior.html#methodgetOption">CPSComponentBehavior::getOption()</a></span><br>
													<span class="method-name"><a href="../../psYiiExtensions/Behaviors/CPSComponentBehavior.html#methodgetOptions">CPSComponentBehavior::getOptions()</a></span><br>
													<span class="method-name"><a href="../../psYiiExtensions/Behaviors/CPSComponentBehavior.html#methodgetOptionsObject">CPSComponentBehavior::getOptionsObject()</a></span><br>
													<span class="method-name"><a href="../../psYiiExtensions/Behaviors/CPSComponentBehavior.html#methodgetPrefixDelimiter">CPSComponentBehavior::getPrefixDelimiter()</a></span><br>
													<span class="method-name"><a href="../../psYiiExtensions/Behaviors/CPSComponentBehavior.html#methodgetPublicOptions">CPSComponentBehavior::getPublicOptions()</a></span><br>
													<span class="method-name"><a href="../../psYiiExtensions/Behaviors/CPSComponentBehavior.html#methodgetValidPattern">CPSComponentBehavior::getValidPattern()</a></span><br>
													<span class="method-name"><a href="../../psYiiExtensions/Behaviors/CPSComponentBehavior.html#methodhasOption">CPSComponentBehavior::hasOption()</a></span><br>
													<span class="method-name"><a href="../../psYiiExtensions/Behaviors/CPSComponentBehavior.html#methodisCBFunction">CPSComponentBehavior::isCBFunction()</a></span><br>
													<span class="method-name"><a href="../../psYiiExtensions/Behaviors/CPSComponentBehavior.html#methodisEmpty">CPSComponentBehavior::isEmpty()</a></span><br>
													<span class="method-name"><a href="../../psYiiExtensions/Behaviors/CPSComponentBehavior.html#methodmakeOptions">CPSComponentBehavior::makeOptions()</a></span><br>
													<span class="method-name"><a href="../../psYiiExtensions/Behaviors/CPSComponentBehavior.html#methodmergeOptions">CPSComponentBehavior::mergeOptions()</a></span><br>
													<span class="method-name"><a href="../../psYiiExtensions/Behaviors/CPSComponentBehavior.html#methodraiseEvent">CPSComponentBehavior::raiseEvent()</a></span><br>
													<span class="method-name"><a href="../../psYiiExtensions/Behaviors/CPSComponentBehavior.html#methodsetInternalName">CPSComponentBehavior::setInternalName()</a></span><br>
													<span class="method-name"><a href="../../psYiiExtensions/Behaviors/CPSComponentBehavior.html#methodsetOption">CPSComponentBehavior::setOption()</a></span><br>
													<span class="method-name"><a href="../../psYiiExtensions/Behaviors/CPSComponentBehavior.html#methodsetOptions">CPSComponentBehavior::setOptions()</a></span><br>
													<span class="method-name"><a href="../../psYiiExtensions/Behaviors/CPSComponentBehavior.html#methodsetPrefixDelimiter">CPSComponentBehavior::setPrefixDelimiter()</a></span><br>
													<span class="method-name"><a href="../../psYiiExtensions/Behaviors/CPSComponentBehavior.html#methodsetValidPattern">CPSComponentBehavior::setValidPattern()</a></span><br>
													<span class="method-name"><a href="../../psYiiExtensions/Behaviors/CPSComponentBehavior.html#method__get">CPSComponentBehavior::__get()</a></span><br>
													<span class="method-name"><a href="../../psYiiExtensions/Behaviors/CPSComponentBehavior.html#method__set">CPSComponentBehavior::__set()</a></span><br>
											</blockquote>
										
		</div>
	</div>

	<a name="sec-consts"></a>
	<div class="info-box">
		<div class="info-box-title">Class Constants</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
							<a href="#sec-descendents">Descendants</a> |
										<a href="#sec-var-summary">Constants</a> (<span class="disabled">details</span>)
						
			
												<a href="#sec-vars">Vars</a>
														| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
					</div>
		<div class="info-box-body">
			<a name="constHTTP_GET" id="HTTP_GET"><!-- --></A>
<div class="oddrow">

	<div class="const-header">
		<img src="../../media/images/Variable.png" />
		<span class="const-title">
			<span class="const-name">HTTP_GET</span>
			 = <span class="const-default"> 'GET'</span>
			(line <span class="line-number">30</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">'GET' Http method</p>
	
	
</div>
<a name="constHTTP_POST" id="HTTP_POST"><!-- --></A>
<div class="evenrow">

	<div class="const-header">
		<img src="../../media/images/Variable.png" />
		<span class="const-title">
			<span class="const-name">HTTP_POST</span>
			 = <span class="const-default"> 'POST'</span>
			(line <span class="line-number">34</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">'PUT' Http method</p>
	
	
</div>
						
		</div>
	</div>

	<p class="notes" id="credit">
		Documentation generated on Mon, 15 Jun 2009 22:58:11 -0400 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.2</a>
	</p>
	</div></body>
</html>